CC = g++
CFLAGS = -c -Wall -O3 -I../../common/include
LDFLAGS = -L../../common/mylib
LIBS = -lmylib -lSDL -lpthread
TARGET = starfield
SRCS = \
star.cpp \
starfield.cpp
OBJS = $(SRCS:.cpp=.o)

all: $(SRCS) $(TARGET)
	
$(TARGET): $(OBJS) 
	$(CC) $(OBJS) -o $@ $(LDFLAGS) $(LIBS)

.cpp.o:
	$(CC) $(CFLAGS) $< -o $@

clean:
	$(RM) $(OBJS)

dist-clean: clean
	$(RM) $(TARGET)
